package com.bing.bingpro;

import lombok.Data;

import java.util.*;
import java.util.stream.Collectors;


class Main {


    public static void main(String[] args) {
        List<Date> dateList1 = new ArrayList<>();
        dateList1.add(new Date(2021-1900, 5, 1));
        dateList1.add(new Date(2021-1900, 5, 2));
        dateList1.add(new Date(2021-1900, 5, 3));

        List<Date> dateList2 = new ArrayList<>();
        dateList2.add(new Date(2021-1900, 5, 2));
        dateList2.add(new Date(2021-1900, 5, 3));
        dateList2.add(new Date(2021-1900, 5, 4));

        Set<Date> dateSet = new HashSet<>();
        dateSet.addAll(dateList1);
        dateSet.addAll(dateList2);

        int count = dateSet.size();

        System.out.println("并集日期个数为：" + count);
    }
}
